<template>
  <div>
    <div class="zhanwei"></div>
    <div class="category-secondary">
      <div class="item" v-for="item in dataList.category" :key="item.cat_id">
        <img :src="item.touch_icon" alt="" />
        <p>{{ item.cat_name }}</p>
      </div>
    </div>
    <div class="category-brand">
      <div class="tit">品牌精选</div>
      <div class="cont">
        <div class="item" v-for="item in dataList.brand" :key="item.brand_id">
          <img :src="item.brand_logo" alt="" />
          <p>{{ item.brand_name }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:['dataList']
};
</script>

<style lang="less" scoped>
.zhanwei {
  height: 8.6rem;
}

  .category-secondary {
    width: calc(100% - 2rem);
    // height: 12rem;
    margin: 1rem 1rem;
    background-color: #fff;
    border-radius: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content:flex-start;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    .item {
      // flex: 1;
      width: 20%;
      height: 9.1rem;
      margin-bottom: 1rem;
      text-align: center;
      img {
        width: 5.3rem;
      }
      p {
        width: 100%;
      }
    }
  }
  .category-brand {
    border-radius: 1rem;
    background-color: #fff;
    width: calc(100% - 2rem);
    margin: 1rem 1rem;
    .tit {
      box-sizing: border-box;
      height: 5rem;
      width: 100%;
      padding: 2rem 2rem 1rem;
    }
    .cont {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      .item {
        width: 25%;
        text-align: center;
        margin-bottom: 1rem;
        img {
          width: 100%;
        }
      }
    }
  
}
</style>